package cn.boyu.controller;


import cn.boyu.entity.SysDictData;
import cn.boyu.result.AjaxResult;
import cn.boyu.service.ISysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author yn
 * @since 2022-11-22
 */
@RestController
@CrossOrigin
@RequestMapping("/sysDictData")
public class SysDictDataController {
    @Autowired
    private ISysDictDataService dataService;

    //根据type获取字典值
    @GetMapping("/getType")
    public AjaxResult getType(String dictType, Integer value) {
        List<SysDictData> list = dataService.getType(dictType,value);
        return AjaxResult.success(list);
    }

}

